/*
JuffEd - A simple text editor
Copyright 2007 Murzin Mikhail

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License 
version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

#ifndef _TEXT_DOC_H_
#define _TEXT_DOC_H_

class TextDocInterior;

#include "Document.h"

class TextDoc : public Document {
Q_OBJECT
public:
	TextDoc(const QString&, QWidget*);
	virtual ~TextDoc();

	//	methods of parent class Document
	virtual QWidget* widget() const;
	virtual void applySettings();
	virtual bool save();
	virtual bool saveAs(const QString&);
	virtual bool isModified();

	//	own members
	virtual int lineCount() const;
	virtual void cut();
	virtual void copy();
	virtual void paste();
	virtual void undo();
	virtual void redo();
	virtual void setCharset(const QString&);
	virtual void find(const QString&, bool, bool);
	virtual void gotoLine(int);
	virtual void getCursorPos(int&, int&);
	virtual QString charset() const;

signals:
	void cursorPosChanged();

private:
	TextDocInterior* docInt_;
};

#endif
